/**
 * @filename:${entityName}.java
 * Copyright(c) 2020 ${author}
 * All right reserved.
 */

package ${wrapperUrl};

import ${entityUrl}.${entityName};
import ${dtoUrl}.${entityName}DTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.util.List;

/**
 *
 * @Description:  ${entityComment} - 数据转换，支持多对一的转化
 * @Author:       ${author}
 * @CreateDate:   ${createTime}
 * @Version:      ${version}
 *
 */

@Mapper(componentModel="spring")
public interface ${entityName}DTOWrapper {

    @Mappings({
        <#list cis as ci>
            @Mapping(source = "${objectName}.${ci.property}", target = "${ci.property}"),
        </#list>
    })

    /*optional*/
    ${entityName}DTO domain2dto(${entityName} ${objectName});

    /*optional*/
    List<${entityName}DTO> domain2dto(List<${entityName}> ${objectName}s);

}
